// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import './static/css/base.css'
import './static/css/reset.css'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import store from './store/store'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
import VueI18n from 'vue-i18n'
import $ from 'jquery'
Vue.config.productionTip = false
Vue.use(MintUI)
Vue.use(VueI18n)
Vue.use(VueAwesomeSwiper)
Vue.prototype.$axios = axios;

let sessionLocale='zh_cn';
if(sessionStorage.getItem('lang')){
  sessionLocale = sessionStorage.getItem('lang')
}
const i18n = new VueI18n({

  locale: sessionLocale,    // 语言标识
  //this.$i18n.locale // 通过切换locale的值来实现语言切换
  messages: {
    'zh_cn': require('./static/lang/zh'),   // 中文语言包
    'en_us': require('./static/lang/en')    // 英文语言包
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  i18n,
  components: { App },
  template: '<App/>'
})
